import request from '@/utils/request'

// 查询优惠卷列表
export function listVolume(query) {
  return request({
    url: '/welfare/volume/list',
    method: 'get',
    params: query
  })
}

// 查询优惠卷详细
export function getVolume(volumeId) {
  return request({
    url: '/welfare/volume/' + volumeId,
    method: 'get'
  })
}

// 新增优惠卷
export function addVolume(data) {
  return request({
    url: '/welfare/volume',
    method: 'post',
    data: data
  })
}

// 修改优惠卷
export function updateVolume(data) {
  return request({
    url: '/welfare/volume',
    method: 'put',
    data: data
  })
}

// 删除优惠卷
export function delVolume(volumeId) {
  return request({
    url: '/welfare/volume/' + volumeId,
    method: 'delete'
  })
}
